var source = {
  attr: 'attr',
  fn: function () {}
}
var target = {}

Object.assign(target, source)

console.log(target)
